package com.smartwebx.ha.web.admin.module.screen.area;

import java.io.PrintWriter;

import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;

import com.fasterxml.jackson.databind.ObjectMapper;
import com.smartwebx.ha.biz.assign.HaAreaManager;

public class AjaxAreaTree {
	@Autowired
	private HttpServletResponse response;
	@Autowired
	private HaAreaManager haAreaManager;
	public void execute() throws Exception{
		response.setContentType("application/json");
		PrintWriter out=response.getWriter();
		ObjectMapper mapper=new ObjectMapper();
		mapper.writeValue(out, haAreaManager.getAreaTree());
	}

}
